package com.source.lightfowl.basedata.service;

import com.source.lightfowl.VO.SlaughterHouseVO;
import com.source.lightfowl.basedata.entity.SlaughterHouse;
import org.springframework.data.domain.Page;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
import java.util.Optional;

/**
 * @Author: cxy
 * @Description: 屠宰市场信息业务层接口
 */
public interface SlaughterHouseService extends UploadExcelService {

    List<Object> findAllDTO();
    void save(List<Object> list, HttpServletRequest request);

    //3.3查
    List<SlaughterHouseVO> findAll(int state);
    //3.2查 分页
    Page<SlaughterHouse> findAllPage(int page, int pageNum);
    Page<SlaughterHouseVO> findAllPageVO(int state, int page, int pageNum);
    //3.1查找根据id查找
    Optional<SlaughterHouse> findById(Integer id);
    SlaughterHouseVO findByIdVO(Integer id);
    String findIdByUser(String id);

    //1.增 或者改
    void save(SlaughterHouse sh);
    void save(SlaughterHouse sh, MultipartFile file, HttpServletRequest request);

    //2.1删
    void deleteById(Integer id);
    //2.2批量删
    void deleteBatch(int state, String ids);

    //按名字模糊查询
    List<SlaughterHouseVO> getByLikeName(String name);

    //按省返回所有市
    List<String> findByProvince(String province);
    //按市返回所有区
    List<String> findByCity(String province, String city);
    //按区返回名字
    List<SlaughterHouse> findByDistrict(String province, String city, String district);

    void changeBatch(int state, String ids);
}
